<template>
	<el-config-provider :locale="locale" :size="size">
		<router-view />
	</el-config-provider>
</template>

<script setup lang="ts">
import { computed, nextTick, onMounted, ref } from 'vue'
import { RouterView } from 'vue-router'
import { useTitle } from '@vueuse/core'
import { useI18n } from 'vue-i18n'
import { messages } from '@/i18n'
import { handleThemeStyle } from '@/utils/theme'
import { useAppStore } from '@/store/modules/app'
import { SessionStorage, Storage } from '@/utils/storage'
import cache from '@/utils/cache'
const appStore = useAppStore()
const { t } = useI18n()
const locale = computed(() => messages[appStore.language].el)
const size = computed(() => appStore.componentSize)
const token = ref(null)
// 设置标题
useTitle(t('app.title'))

onMounted(() => {
	// cache.setToken(null)
	nextTick(() => {
		// 初始化主题样式
		handleThemeStyle(appStore.theme)

		//	this.setRefreshToken(null)
	})
})
</script>
<style lang="scss">
@import './styles/cf.scss';

.el-radio__label {
	font-size: 13px !important;
}

.el-dialog {
	padding: 0px !important;
	--el-dialog-padding-primary: 0 !important;
}

.custom-header {
	height: 50px;
	line-height: 50px;
	background-color: #eaeaea;
	padding-left: 20px;
	font-size: 15px;
	border-radius: 4px 4px 0px 0px;
}

.el-dialog__header.show-close {
	padding-right: 0px !important;
}

.el-dialog__headerbtn .el-dialog__close {
	color: #333 !important;
}

.el-dialog__body {
	padding: 20px !important;
}

.green {
	color: green !important;
}

.el-table .orange {
	color: orange !important;
}

.el-table .red {
	color: red !important;
}
</style>
